package cn.iocoder.yudao.module.system.controller.admin.examtest.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 考试信息树形结构 Response VO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExamTestTreeRespVO {

    @Schema(description = "考试ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "考试名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024年春季期中考试")
    private String examName;

    @Schema(description = "考试类型", example = "期中考试")
    private String examType;

    @Schema(description = "考试时间")
    private LocalDateTime examDate;

    @Schema(description = "总分", example = "750")
    private BigDecimal totalScore;

    @Schema(description = "考试说明", example = "本次考试为全年级统一考试")
    private String description;

    @Schema(description = "状态：1-未开始，2-进行中，3-已结束", example = "1")
    private Integer status;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "班级列表")
    private List<ExamClassNode> classList;

    /**
     * 班级节点信息
     */
    @Schema(description = "班级节点信息")
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ExamClassNode {

        @Schema(description = "班级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long classId;

        @Schema(description = "班级名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "高三(1)班")
        private String className;

        @Schema(description = "班级编码", example = "C2024001")
        private String classCode;

        @Schema(description = "年级", example = "高三")
        private String grade;

        @Schema(description = "学生人数", example = "45")
        private Integer studentCount;

        @Schema(description = "班主任ID", example = "10")
        private Long teacherId;

        @Schema(description = "班主任姓名", example = "张老师")
        private String teacherName;

        @Schema(description = "班级状态：1-正常，0-停用", example = "1")
        private Integer status;
    }
}

